<!DOCTYPE html>
<html>
<#include "../../include/PC_Header.html">
<link href="${webroot}${theme_dir}/media/css/button.css" rel="stylesheet">
<body>
	<#assign nid="my_invest"> 
    	<#assign flag="autoDetail"> 
	<#include "../../include/header.html">
	<div class="qd_aboutus-top"><h3>您的位置：<a href="/">首页</a>&gt;<a>我的投资</a>&gt;<a href="/member/auto/detail.html">自动投资</a></h3></div>
	<div class="pb30 pt20">
	<!--header-end-->
	<!--用户中心的主栏目 开始-->
		<#if userCache.userType==2||userCache.userType==3>
			<#include "../../include/member_borrow_header.html">
				<#else>
					<#include "../../include/member_header.html">
		</#if>
	<div id="container">
		<div class="usermain clearfix">
			<div class="user_left">
				<#if isImp == 0>
					<#include "../trade_menu.html">
				<#else>
					<#include "../trade_menu_isImp.html">
				</#if>
			</div>
			<div class="user_right autoInvest tab_change my_preferences">
				<h2 class="user_title bb10f4f4f4 user_title01">自动投资</h2>
				<ul class="title_list">
					<li class="hover"><h2 class="list_btn auto_invest_setting">自动投资设置</h2></li>
					<li class=""><h2 class="list_btn auto_invest_record">自动投资记录</h2></li>
				</ul>

				<!-- S 自动投标设置 -->
				<div class="list_div" style="display: block;">
					<form method="post" id="autoForm" action="/member/auto/modify.html">
						<dl class="auto_switch">
							<dt>
								自动投资状态：<div class="autoSwitch <#if auto.enable>autoSwitch_hover</#if> "><input type="checkbox" name="enable" style="display: none;" <#if auto.enable>checked="checked" value="true"</#if>></div> <em class="changeStatus <#if !auto.enable>hide</#if>">修改设置</em>
							</dt>
							<dd>
								您的可用余额：<em> ${account.useMoney}</em><i>元</i>
							</dd>
						</dl>
						<ul class="select_condition hide">
							<li><label class="leftWidth">投资金额：</label>
								<dl class="money">
									<dd>
										<label for="money1">
										<input type="radio" name="tenderStyle" id="money1" <#if auto.tenderStyle==0||auto.tenderStyle==1>checked="checked"</#if> value="1"> 可用余额全投</label>
									</dd>
									<dd>
										<label for="money2">
										<input type="radio" name="tenderStyle" id="money2" <#if auto.tenderStyle==2>checked="checked"</#if>value="2">&nbsp;固定每次投资金额</label>　<em>
										<input type="text" name="money" onKeyUp="replaceAndSetPos(this,/[^0-9]/g,'')" <#if auto.tenderStyle!=2>disabled="true" </#if> value="<#if auto.money!=0>${auto.money}</#if>" placeholder="不少于100元的整数"><i>元</i></em><span class="errorTip"></span>
									</dd>
									<dd>
										<label for="money3">
										<input type="radio" name="tenderStyle" id="money3" <#if auto.tenderStyle==3>checked="checked"</#if>value="3">&nbsp;投资金额区间</label>　　　<em>
										<input type="text" name="min" onKeyUp="replaceAndSetPos(this,/[^0-9]/g,'')" placeholder="不少于100元的整数" <#if auto.tenderStyle!=3>disabled="true" </#if> value="<#if auto.min!=0>${auto.min}</#if>"><i>元</i></em> — <em>
										<input type="text" name="max" onKeyUp="replaceAndSetPos(this,/[^0-9]/g,'')"  <#if auto.tenderStyle!=3>disabled="true" </#if> value="<#if auto.max!=0>${auto.max}</#if>"><i>元</i></em><span class="errorTip"></span>
									</dd>
								</dl></li>
							<li><label class="leftWidth">投资时间：</label>
								<dl class="invest_time">
									<dd>
										<label for="timelimitEnable1">
										<input type="radio" name="timelimitEnable" id="timelimitEnable1"
											<#if auto.timelimitUp==0>checked="checked"</#if>> 不限制</label>
									</dd>
									<dd>
										<label for="timelimitEnable2">
										<input type="radio" name="timelimitEnable" id="timelimitEnable2"  <#if auto.timelimitUp!=0>checked="checked"</#if>>
											月范围必须在 </label>　　　<select name="timelimitDown" <#if auto.timelimitUp==0> disabled="true" </#if> id="timelimitDown">
												<#list list as item>
												<option value="${item}" <#if auto.timelimitDown==item>selected="selected"</#if>>${item}个月</option>
												</#list>
										</select> — <select name="timelimitUp" id="timelimitUp" <#if auto.timelimitUp==0> disabled="true" </#if>>
												<#list list as item>
												<#if item!=0>
												<option value="${item}" <#if auto.timelimitUp==item>selected="selected"</#if>>${item}个月</option>
												</#if>
												</#list>
										</select><span class="errorTip"></span>
									</dd>
								</dl></li>
							<li><label class="leftWidth">年化收益：</label> <label for="aprEnable1">
							<input name="aprEnable" type="radio" id="aprEnable1"  <#if auto.aprDown==0>checked="checked"</#if> /> 不限制</label>　<label for="aprEnable2">
							<input name="aprEnable" id="aprEnable2" type="radio"<#if auto.aprDown!=0>checked="checked"</#if>/>&nbsp;不低于 </label>&nbsp;&nbsp;<em><input type="text" name="aprDown" onkeyup="if(this.value==this.value2);if(this.value.search(/^\d*(?:\.\d{0,2})?$/)==-1)this.value=(this.value2)?this.value2:'';else this.value2=this.value;"  <#if auto.aprDown==0>disabled="true"</#if> value="<#if auto.aprDown!=0>${auto.aprDown}</#if>"><i>%</i></em><span class="errorTip"></span></li>
							<li><label class="leftWidth">还款方式：</label> 
							<label for="style2">
							<input type="checkbox" id="style2" name="style" value="2" <#if !auto.style??||auto.style??&&auto.style?index_of("2")!=-1>checked="checked"</#if>>&nbsp;一次性到期还款</label> 　
							<label for="style1"><input type="checkbox" id="style1" name="style" value="1" <#if !auto.style??||auto.style??&&auto.style?index_of("1")!=-1>checked="checked"</#if>> 按月分期还款</label>　 
							<label for="style3"><input type="checkbox" id="style3" name="style" value="3" <#if !auto.style??||auto.style??&&auto.style?index_of("3")!=-1>checked="checked"</#if>> 每月还息到期还本</label><span class="errorTip "></span></li>
							<li class="save_reset">
							<input type="hidden" name="id" value="${auto.id}">
							<input type="button" id="reset_button" value="返回"><input type="submit" id="save_button1" value="保存">
							</li>
						</ul>
					</form>
					<div id="confirmationSlip" class="hide">
						<table class="table table-bordered">
							<thead>
								<tr>
									<th>投资金额</th>
									<th>投资期限</th>
									<th>年化收益</th>
									<th>还款方式</th>
								</tr>
							</thead>
							<tbody>
								<tr>
									<td></td>
									<td></td>
									<td></td>
									<td></td>
								</tr>
							</tbody>
						</table>
						<input class="confirmationButton" type="button" value="提交">
					</div>
					<div class="auto_explain">
						<h2>注意事项：</h2>
						<ol>
							<li>1、开启自动投资后，自动投资功能将在5分钟内生效；</li>
							<li>2、自动投资时不可使用红包等奖励进行投资；</li>
							<li>3、若设定投资金额区间时，将根据账户可用余额和项目剩余可投金额执行投资，投资金额为区间值。</li>
						</ol>
					</div>
				</div>
				<!-- E 自动投标设置 -->
				<!-- S 自动投标记录 -->
				<div class="list_div" id="AutoInvestRecordDiv" style="display: none;">
					<table class="table_content mt10">
						<thead>
							<tr>
								<th class="bidName">项目名称</th>
								<th class="money">投资金额</th>
								<th>结果</th>
								<th>记录时间</th>
								<th>备注</th>
							</tr>
						</thead>
						<tbody id="member_table"></tbody>
					</table>
					<div id="kkpagerAutoInvestRecord" class="kkpager"></div>
				</div>
				<!-- E 自动投标记录 -->
			</div>
		</div>
	</div>
	</div>
	<#include "../../include/PC_Footer_Additional_JS.html">
	<script>
		seajs.use("${webroot}${theme_dir}/media/js/member/autodetail");
		seajs.use('member/myAutoTenderLog');
	</script>
	<#include "../../include/footer.html">
</body>
</html>
